
using Game.modules.player.input;

using UnityEngine;

public class InputCollector : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        moveCheck();
    }

    private void moveCheck()
    {
        float H = Input.GetAxis("Horizontal");
        float V= Input.GetAxis("Vertical");
        if(H!=0 || V!=0)
        {
            //对象池
            MoveCommand moveCommand = new MoveCommand();
            moveCommand.direction = new Vector3(H, V).normalized;
            moveCommand.moveObj = gameObject;
            //将commadn加入指令队列
        }
    }
}
